<template>

  <div >
    <exam-stat-total-score v-if="postForm.statType==='totalScore'" :data="postForm"/>
    <exam-stat-dept-score v-if="postForm.statType==='deptScore'" :data="postForm"/>
    <exam-stat-group-score v-if="postForm.statType==='groupScore'" :data="postForm"/>
    <exam-stat-range-score v-if="postForm.statType==='rangeScore'" :data="postForm"/>

  </div>

</template>

<script>
import permission from '@/directive/permission/index.js'
import ExamStatTotalScore from '@/views/admin/exam/stat/components/ExamStatTotalScore.vue'
import ExamStatDeptScore from '@/views/admin/exam/stat/components/ExamStatDeptScore.vue'
import ExamStatGroupScore from '@/views/admin/exam/stat/components/ExamStatGroupScore.vue'
import ExamStatRangeScore from '@/views/admin/exam/stat/components/ExamStatRangeScore.vue'

export default {
  components: { ExamStatRangeScore, ExamStatGroupScore, ExamStatDeptScore, ExamStatTotalScore },
  directives: { permission },
  data() {
    return {
      postForm: {
        personScope: 1,
        statType: 'score',
        examIds: [],
        userIds: [],
        deptCodes: [],
        groupIds: []
      }
    }
  },

  created() {
    const data = this.$route.query.data
    this.postForm = JSON.parse(data)
    console.log('接来的参数', JSON.stringify(this.postForm))
  }
}
</script>

<style scoped>
.desc {
  font-size: 14px;
  color: #888;
}
</style>
